{extend name="layout"}
{block name="content"}
<section class="Hui-article-box">
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
        <span class="c-gray en">&gt;</span>
        品牌管理
        <span class="c-gray en">&gt;</span>
        品牌列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
                href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
    </nav>
    <div class="Hui-article">
        <article class="cl pd-20">
            <div class="text-c">
                品牌名称：<input type="text" name="brand_name" id='brand_name' style="width:250px" class="input-text">
                <button class="btn btn-success search" type="submit"><i class="Hui-iconfont">&#xe665;</i>搜索</button>
            </div>
            <div class="cl pd-5 bg-1 bk-gray mt-20">
                <span class="l">
                    <a href="{:url('Brand/create')}" class="btn btn-primary radius">
                        <i class="Hui-iconfont">&#xe600;</i> 添加
                    </a>
                </span>
            </div>
            <div class="mt-20">
                <table class="table table-border table-bordered table-bg">
                    <tr>
                        <th scope="col" colspan="10">列表</th>
                    </tr>
                    <tr class="text-c">
                        <th>编号</th>
                        <th>品牌中文名称</th>
                        <th>品牌英文名称</th>
                        <th>品牌首字母</th>
                        <th>品牌图片</th>
                        <th>品牌描述</th>
                        <th>排序</th>
                        <th>加入推荐</th>
                        <th>是否显示</th>
                        <th>操作</th>
                    </tr>

                    {volist name="list" id="vo"}
                    <tr class="text-c">
                        <td>{$vo.brand_id}</td>
                        <td>{$vo.brand_name}</td>
                        <td>{$vo.brand_letter}</td>
                        <td>{$vo.brand_first_char}</td>
                        <td>{$vo.brand_logo}</td>
                        <td>{$vo.brand_desc}</td>
                        <td>{$vo.sort_order}</td>
                        <td>{$vo.audit_status}</td>
                        <td>{$vo.is_show}</td>
                        <td>
                            <a href="{:url('read',['id'=>$vo.brand_id])}" class="btn btn-success radius">查看</a>
                            <a href="{:url('edit',['id'=>$vo.brand_id])}" class="btn btn-primary radius">编辑</a>
                            <a class="btn btn-danger radius del"
                               link="{:url('delete',['brand_id'=>$vo.brand_id])}">删除</a>
                        </td>
                    </tr>
                    {/volist}
                </table>
                {$list|raw}
            </div>
        </article>
    </div>
</section>
{/block}
{block name='js'}
<script type="text/javascript">
    $('.search').click(function () {
        var url = "{:url('Brand/index')}";
        var brand_name = $('#brand_name').val();
        if (brand_name != '' && brand_name != undefined && brand_name != null) {
            url = url + '/brand_name/' + brand_name;
        }
        window.location.href = url;
    });
</script>
{/block}